Skip to main content

Function Calling Node

The Function Calling node allows you to invoke one or more predefined functions as part of your chatflow. This means you can call backend services, APIs, or custom logic during the conversation. Each function you configure can have a unique name, a human-readable description to clarify its purpose, and a set of parameters with specific types that it requires. You can chain multiple functions together, meaning the output of one can be passed as input to another, enabling complex voiceflow and logic execution. Additionally, you can pass variables dynamically into these functions and handle their responses downstream in your flow.


1. Add & Manage Functions

  • Add Function To create a new function block, simply click the + Add Function button. This adds a new section where you can define the function's name, description, and parameters.

  • Delete Function If you want to remove a function you no longer need, open its panel and click Delete Function. This will remove the entire function block and its parameters from your chatflow.

Each function is displayed in its own collapsible panel to help you keep your workspace organized. When expanded, you can edit the details; when collapsed, you get a compact overview.

▾ Function 1
+ Add Function

2. Configure a Single Function

When you expand a function panel, you will see fields where you specify the details of the function:

2.1 Function Name

  • Field: Function Name (required)
  • Purpose: This is the unique identifier of the function you want to call. It must exactly match the name of a function defined in your backend system or integration platform. This ensures the system knows which code to execute when this function is invoked.

2.2 Function Description

  • Field: Function Description (required)
  • Purpose: Here, you provide a brief, human-readable explanation of what the function does. This helps anyone reviewing the chatflow understand the function's purpose quickly and aids collaboration or troubleshooting.

3. Define Parameters

Under each function, you can specify one or more parameters that the function expects. Each parameter corresponds to an input the function requires to operate correctly.

FieldDescription
NameThe key name of the parameter as expected by your function (e.g., userId, startDate). It must match what your backend expects.
TypeThe data type of the parameter. Choose from: string, number, boolean, object, or array. This ensures correct data handling.
Initial ValueThe default value or expression to pass into the parameter. You can input a static literal (e.g., "1234") or use the fx button to select a dynamic flow variable or expression.
Add SiblingClicking the + button adds another parameter row at the same level, allowing you to provide multiple inputs for the function.
RemoveClick the red trash icon to delete a parameter you no longer need.
Example Parameter Panel
Function 1
+ Function Name: [ fetchUserData ]
+ Function Description: [ “Get user info by ID” ]
├─ userId [string] [ “{{customerId}}” ] fx [+] [🗑]
[+ Add Sibling]
[Delete Function]

This example shows a function named fetchUserData that takes a single userId parameter. The value of userId is dynamically pulled from a flow variable {{customerId}}.


4. Chaining Multiple Functions

  • After you configure your first function, you can add more functions by clicking + Add Function again. This allows you to set up multiple functions to run one after the other in sequence.

  • Each function executes in the order they appear, allowing you to build logical chains. For example, the output from Function 1 can be passed as input to Function 2 using the fx variable inserter, facilitating complex voiceflow that depend on previous results.


Tips

  • Name functions clearly: Make sure your function names exactly match those defined in your backend or integrations to avoid runtime errors.

  • Validate parameter types: Always confirm the types you assign to parameters are correct to prevent function failures. For example, don’t pass a string value where the function expects a number.

  • Use flow variables (fx) for dynamic data: Instead of hard-coding values, use the fx button to inject variables or expressions from your flow, ensuring your functions receive the most current data.

  • Chain logically: If a function relies on output from a previous function, set the parameters accordingly to pass that output along.

  • Keep your flow tidy: Remove unused functions by clicking Delete Function to keep the workspace organized and maintainable.